<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box{
            width: 140px;
            height: 140px;
           
            background-image: url(../image1/bg.png);
            background-position: 0 0;
            animation: dong 2s steps(12) infinite,
            move 1s steps(12) infinite;
        }
        /* 定义动画专门从左边到右边 */
        @keyframes move{
            form{
                transform: translate(0);
            }
            to{
                transform: translateX(1600px);
            }

        }
        @keyframes dong{
            from{
                background-position: 0 0;
            }
            to{
                background-position: -1680px 0;
            }
        }
        


    </style>
</head>
<body>
    <div class="box"></div>
</body>
</html>